<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>
        Hello from Facelets <br/>
        message = #{pboManagedBean.currFamily.lastName}<br/>
        families = #{pboManagedBean.families}<br/>
        <hr/>
        files = #{pboManagedBean.files}
        <hr/>
        <h:form>
        <h:dataTable value="#{pboManagedBean.families}" 
                     var="family">
            <h:column>
                <f:facet name="header">
                    <h:outputText value="nazwisko" />
                </f:facet>
                <h:outputText value="#{family.lastName}" />
                <h:commandLink action="#{pboManagedBean.CF(family)}" value="kliknij"/>
            </h:column>
            <h:column>
                <f:facet name="header">
                    <h:outputText value="dzieci"/>
                </f:facet>
                <h:outputText value="#{pboManagedBean.getChildren(family)}"/><hr/>
                <h:outputText value="#{pboManagedBean.currChild.name}"/>
            </h:column>
            <h:column>
                <f:facet name="header">
                    <h:outputText value="nic" />
                </f:facet>
                <h:outputText value="#{pboManagedBean.currentChildImages}" /><hr/>
                <h:graphicImage url="http://localhost:8080/XmasCharity#{pboManagedBean.currentChildImages.get(0)}"/>
            </h:column>
        </h:dataTable>

        </h:form>
        payments= #{pboManagedBean.payments}<br/>

        <h:dataTable value="#{pboManagedBean.payments}" 
                     var="payment">
            <h:column>
                <f:facet name="header">
                    <h:outputText value="email" />
                </f:facet>
                <h:outputText value="#{payment.email}" />
            </h:column>
            <h:column>
                <f:facet name="header">
                    <h:outputText value="kwota"/>
                </f:facet>
                <h:outputText value="#{payment.amount}"/>
            </h:column>
            <h:column>
                <f:facet name="header">
                    <h:outputText value="data" />
                </f:facet>
                <h:outputText value="#{payment.requestDate}" />
            </h:column>
        </h:dataTable>
        <ui:repeat value="#{pboManagedBean.families}" var="family">
          <!--      #{pboManagedBean.setCurrFamily(family)} -->
            <h:outputText value="#{family.lastName}"/><br/>
            <ui:repeat value="#{pboManagedBean.children}" var="child">
                #{pboManagedBean.setCurrChild(child)}
                <h:outputText value="----#{pboManagedBean.currChild.name}----#{pboManagedBean.currFamily}"/><br/>
                <ui:repeat value="#{pboManagedBean.currentChildImages}" var="image">
                    <h:outputText value="--------#{image}"/><br/>
                    --------<h:graphicImage url="http://localhost:8080/XmasCharity#{image}"/><br/>               

                </ui:repeat>

            </ui:repeat>

        </ui:repeat>
        
        list 1 = #{pboManagedBean.list1}<br/>
        list 2 = #{pboManagedBean.list2}
    </h:body>


</html>

